package com.atuigu.test;

import com.atguigu.bean.Person;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 伟哥
 * @date 2021-04-29 10:12
 */
public class IOCTest6 {
    private ApplicationContext ioc = new ClassPathXmlApplicationContext("ioc6.xml");

    /**
     * 实验16：基于xml自动装配（自动赋值）
     */
    @Test
    public void test16(){
        Person person = ioc.getBean("person",Person.class);
        System.out.println(person);
    }

    /**
     * 实验17：SpEL测试
     */
    @Test
    public void test17(){
        Person person = ioc.getBean("person01",Person.class);
        System.out.println(person);
    }
}
